<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich" xml:lang="en">
<head>
<title>试卷管理</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
	content="A short description of this page." />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/public.css"
	rel="stylesheet" type="text/css" media="screen" />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/main.css"
	rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<!-- rich:message style-->
<style type="text/css">
	.rich-message-label{
		color:red;
	}
</style>

<script type="text/javascript">
//<![CDATA[ 
	function getAnswer(){
		
		var answerList = document.getElementsByName("ansderValue");
		//alert(answerList.length);
		var answerValue="";
		for(var i=0;i<answerList.length;i++){
			answerValue += answerList[i].value+"、";
		}
		//alert(answerValue);
		document.getElementById("j_id58:tp_ea_answer").value = answerValue;
		var answerValueNew = document.getElementById("j_id58:tp_ea_answer").value;
		if("" == answerValueNew){
			document.getElementById("msg_id").style.display = 'block';
			return false;
		}else{
			document.getElementById("msg_id").style.display = 'none';
			return true;
		}
	}
	//]]> 
</script>

</head>
<body style="background-color: #ffffff">

	<div id="right">
	<a4j:form>
	<div id="msgid" class="error pt10p bcf c0 tal" style="display: ">
	<a4j:outputPanel id="msgPanel">
		<center><h:outputText styleClass="cff" value="#{QualifyforBB.msg}" /></center>
		<center>【友情提示】请考生注意考试时间！超时者不能继续考试！　　　　　　系统非正常退出情况，请考试重新登录继续答题！　　　　　　如有问题请联系管理员或者导师 </center>
	</a4j:outputPanel></div>
	<div class="tablelist">
	<table width="100%"  cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td><span class="cff"></span>考核人:<h:outputText value="#{QualifyforBB.examinebank.tp_e_aim}"/></td>
			<td><span class="cff"></span>考核名称:<h:outputText value="#{QualifyforBB.examinebank.tp_e_aim}"/></td>
			<td><span class="cff"></span>考核时间： <h:outputText value="#{QualifyforBB.examinebank.tp_t_time}分钟"/></td>
			<td><span class="cff"></span>总分： <h:outputText value="#{QualifyforBB.total}"/></td>
			<td>
			<h:inputHidden id="Qualifyfor" value="#{QualifyforBB.testeeExaminebank.complete_flag_value}" />
			<h:commandButton class="buttonbg" value="开始考核"
				action="#{QualifyforBB.StartAnswer}" reRender="table_xz,table_pd,msgPanel" disabled="#{QualifyforBB.startExm}"/></td>
		</tr>
	</table>
	</div>
	
	<div class="tablelist" style="display: #{QualifyforBB.tags==1? 'block':'none'}">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td class="yellow"><span class="cff">判断题#{QualifyforBB.testpaper.tp_count}:</span>
			<span class="cff"></span><h:outputText value="#{QualifyforBB.testpaper.tp_question}"/></td>
		</tr>
	</table>
	<rich:dataTable 
		width="100%" id="table_pd" value="#{QualifyforBB.answerlists}" var="table">
		<a4j:keepAlive beanName="QualifyforBB" />
		<rich:columnGroup>
			<rich:column>
				<h:selectBooleanCheckbox value="#{table.select}" style=" width:20px"/>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.answercode}"      style=" width:50px "/>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.answerdesc}"     />
			</rich:column>
		</rich:columnGroup>
	</rich:dataTable>
	<div class="listbut"><h:commandButton
		styleClass="buttonbg" value="下一题" action="#{QualifyforBB.nextAnswer}"
		reRender="table_xz,table_pd,msgPanel" /></div>
	</div>
</a4j:form>

<a4j:form>
	<div class="tablelist" style="display: #{QualifyforBB.tags==2? 'block':'none'}">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td class="yellow"><span class="cff">单选题#{QualifyforBB.testpaper.tp_count}:</span>
			<span class="cff"></span><h:outputText value="#{QualifyforBB.testpaper.tp_question}"/></td>
		</tr>
	</table>
	<rich:dataTable 
		width="100%" id="table_pd" value="#{QualifyforBB.answerlists}" var="table">
		<a4j:keepAlive beanName="QualifyforBB" />
		<rich:columnGroup>
			<rich:column>
				<h:selectBooleanCheckbox value="#{table.select}" style=" width:20px"/>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.answercode}"      style=" width:50px "/>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.answerdesc}"     />
			</rich:column>
		</rich:columnGroup>
	</rich:dataTable>
	<div class="listbut"><h:commandButton
		styleClass="buttonbg" value="下一题" action="#{QualifyforBB.nextAnswer}"
		reRender="table_xz,table_pd,msgPanel" /></div>
	</div>
</a4j:form>

<a4j:form>
	<div class="tablelist" style="display: #{QualifyforBB.tags==3? 'block':'none'}">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td class="yellow"><span class="cff">多选题#{QualifyforBB.testpaper.tp_count}:</span>
			<span class="cff"></span><h:outputText value="#{QualifyforBB.testpaper.tp_question}"/></td>
		</tr>
	</table>
	<rich:dataTable 
		width="100%" id="table_pd" value="#{QualifyforBB.answerlists}" var="table">
		<a4j:keepAlive beanName="QualifyforBB" />
		<rich:columnGroup>
			<rich:column>
				<h:selectBooleanCheckbox value="#{table.select}" style=" width:20px"/>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.answercode}"      style=" width:50px "/>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.answerdesc}"     />
			</rich:column>
		</rich:columnGroup>
	</rich:dataTable>
	<div class="listbut"><h:commandButton
		styleClass="buttonbg" value="下一题" action="#{QualifyforBB.nextAnswer}"
		reRender="table_xz,table_pd,msgPanel" /></div>
	</div>
</a4j:form>

<a4j:form>
	<div class="tablelist" style="display: #{QualifyforBB.tags==4? 'block':'none'}">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td class="yellow"><span class="cff">填空题#{QualifyforBB.testpaper.tp_count}:</span>
			<span class="cff"></span><h:outputText escape="false" value="#{QualifyforBB.testpaper.tp_question}"/>
			<h:inputHidden id="tp_ea_answer" value="#{QualifyforBB.tp_ea_answer}" />
			</td>
			
		</tr>
		<tr id="msg_id" style="display:none"><td class="yellow"><span style="color:red">请输入您的答案！</span></td></tr>
	</table>
	<div class="listbut"><h:commandButton
		styleClass="buttonbg" value="下一题" onclick="return getAnswer()" action="#{QualifyforBB.nextAnswer}"
		reRender="table_xz,table_pd,msgPanel" /></div>
	</div>
</a4j:form>
	
	<a4j:form>
	<div class="tablelist" style="display: #{QualifyforBB.tags==5? 'block':'none'}">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td class="yellow"><span class="cff">简答题#{QualifyforBB.testpaper.tp_count}:</span>
			<span class="cff"></span><h:outputText value="#{QualifyforBB.testpaper.tp_question}"/></td>
		</tr>
		<tr>
				<td class="yellow">
					<h:inputTextarea id="answercont" style="width:80%" rows="10" value="#{QualifyforBB.answerbank.tp_ea_answer}">
						<f:validateLength maximum="200" />
						<rich:ajaxValidator event="onblur" />
					</h:inputTextarea>
					<span style="cff"><rich:message for="answercont" showSummary="true" showDetail="false" /></span>
				</td>
		</tr>
	</table>
	<div class="listbut"><h:commandButton
		styleClass="buttonbg" value="下一题" action="#{QualifyforBB.nextAnswer}"
		reRender="table_xz,table_pd,msgPanel" /></div>
	</div>
</a4j:form>
	
	<a4j:form>
	<div class="tablelist" style="display: #{QualifyforBB.tags==0? 'block':'none'}" >
	<table width="100%"  cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse; height : 200px;">
		<tr>
			<td style="display: #{QualifyforBB.tr_div==1? 'block':'none'}"><center><span class="cff" style="font-size: 30">本次考试分数:</span><h:outputText class="cff" style="font-size: 30" value="#{QualifyforBB.fraction}"/></center>
			</td>
			<td><h:commandButton
				styleClass="buttonbg2" value="查看答题情况"
				action="#{QualifyforBB.toPapersExamListNew}" reRender="msgPanel" /></td>
		</tr>
	</table>
	</div>
	</a4j:form>
	</div>
</body>
</html>

